package com.hex.ds.hdrs.app.dao;

import com.hex.bigdata.hbda.base.BaseDao;
import com.hex.ds.hdrs.app.po.AppGroupRelationPo;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Package com.hex.ds.hdrs.app.dao
 * @ClassName AppGroupRelationDao
 * @Description 应用与应用组关系表Dao接口
 * @Author yu liuyang
 * @Date 2023/4/16 17:06
 * @Version v1.0
 **/
@Repository
public class AppGroupRelationDao extends BaseDao {

    /**
     * @Method queryList <br>
     * @Param [appGroupRelation] <br>
     * @Return java.util.List<com.hex.ds.hdrs.app.po.AppGroupRelation> <br>
     * @Description 列表查询 <br>
     * @Author yu liuyang <br>
     * @Date 2023/4/16 17:05 <br>
     * @Version V1.0 <br>
     */
    public List<AppGroupRelationPo> queryList(AppGroupRelationPo appGroupRelationPo) {
        return this.selectList(AppGroupRelationPo.class, "com.hex.ds.hdrs.app.dao.AppGroupRelationDao.query", appGroupRelationPo);
    }

    /**
     * @Method queryOne <br>
     * @Param [appGroupRelation] <br>
     * @Return com.hex.ds.hdrs.app.po.AppGroupRelation <br>
     * @Description 查询一个应用与应用组关联 <br>
     * @Author yu liuyang <br>
     * @Date 2023/4/16 10:41 <br>
     * @Version V1.0 <br>
     */
    public AppGroupRelationPo queryOne(AppGroupRelationPo appGroupRelationPo){
        return this.selectOne(AppGroupRelationPo.class,"com.hex.ds.hdrs.app.dao.AppGroupRelationDao.query", appGroupRelationPo);
    }


    /**
     * @Method insert <br>
     * @Param [appGroupRelation] <br>
     * @Return int <br>
     * @Description 插入应用与应用组关联 <br>
     * @Author yu liuyang <br>
     * @Date 2023/4/18 16:10 <br>
     * @Version V1.0 <br>
     */
    public int insert(AppGroupRelationPo appGroupRelationPo) {
        return this.insert("com.hex.ds.hdrs.app.dao.AppGroupRelationDao.insert", appGroupRelationPo);
    }

    /**
     * @Method deleteByAppCode <br>
     * @Param [appCode] <br>
     * @Return int <br>
     * @Description 根据应用编码删除应用与应用组关联 <br>
     * @Author yu liuyang <br>
     * @Date 2023/4/16 10:41 <br>
     * @Version V1.0 <br>
     */
    public int deleteByAppCode(String appCode) {
        return this.delete("com.hex.ds.hdrs.app.dao.AppGroupRelationDao.deleteByAppCode", appCode);
    }
}